<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin: 0;padding: 0
        }
        section{
            width: 500px;
            height: 500px;
            /* border: 10px solid #000; */
            /* margin: 100px auto; */
            position: fixed;
            top: 0;right: 0;bottom: 0;left: 0;
            margin: auto;
            transform:rotateX(30deg) rotateY(30deg) ;
            transform-style: preserve-3d;
            animation: sectionMove 3s infinite linear
        }
        section div{
            width: 500px;height: 500px;
            color: #fff;
            font-size: 100px;
            text-align: center;
            line-height: 500px;
            position: absolute;
            transition: 2s;
            opacity: 0.5;
        }
        div:nth-child(1){
            background: red;
        }
        div:nth-child(2){
            background: green;
        }
        div:nth-child(3){
            background: pink;
        }
        div:nth-child(4){
            background: blue;
        }
        div:nth-child(5){
            background: yellow;
        }
        div:nth-child(6){
            background: purple;
        }
       div:nth-child(1){
            transform: translateX(250px) rotateY(90deg);
        }
       div:nth-child(2){
            transform: translateX(-250px) rotateY(-90deg)
        }
      div:nth-child(3){
            transform: translateY(250px) rotateX(90deg)
        }
       div:nth-child(4){
            transform: translateY(-250px) rotateX(-90deg)
        }
        div:nth-child(5){
            transform: translateZ(250px)
        }
       div:nth-child(6){
            transform: translateZ(-250px)
        }

        @keyframes sectionMove{
            /* 定义动画的状态 */
            0%{
                transform:rotateX(30deg) rotateY(30deg)
            }
            25%{
                transform:rotateX(120deg) rotateY(120deg)
            }
            50%{
                transform:rotateX(210deg) rotateY(210deg)
            }
            75%{
                transform:rotateX(300deg) rotateY(300deg)
            }
            100%{
                transform:rotateX(390deg) rotateY(390deg)
            }
        }
    </style>
</head>
<body>
    <section>
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
    </section>
</body>
</html>